#define _CRT_SECURE_NO_WARNINGS 1
#include"List.h"

int main()
{
	ListNode* pHead = ListInit();
	ListPushBack(pHead, 1);
	ListPushBack(pHead, 2);
	ListPushBack(pHead, 3);
	ListPushBack(pHead, 4);
	ListPushBack(pHead, 5);
	ListPushFront(pHead, 5);
	ListPushFront(pHead, 7);
	ListPushFront(pHead, 8);
	ListPopFront(pHead);
	ListPopBack(pHead);
	ListNode* pos = ListFind(pHead, 2);
	if (pos != NULL)
	{
		ListErase(pos);
	}
	ListNode* pos2 = ListFind(pHead, 1);
	if (pos2 != NULL)
	{
		ListInsert(pos2, 6);
	}
	ListPrint(pHead);
	ListDestory(pHead);
	pHead = NULL;
	return 0;
}